<?php
include_once "../common/header.php";
?>
<script type="text/javascript">
	function update_name()
	{
		var chatdiv = document.getElementById("namebox");
		chatdiv.innerHTML = '<p style="color:black">' + document.name_input.name_text.value + '</p>';

		document.name_input.name_text.value = "";
		return false;
	}
        function update_q1()
	{
		var chatdiv = document.getElementById("q1box");
		chatdiv.innerHTML = '<p style="color:black">' + "Question 1: " + document.q1_input.q1_text.value + '</p>';

		document.q1_input.q1_text.value = "";
		return false;
	}
        function update_m1()
	{
		var chatdiv = document.getElementById("m1box");
		chatdiv.innerHTML = '<p style="color:black">' + document.m1_input.m1_text.value + " Marks" + '</p>';

		document.m1_input.m1_text.value = "";
		return false;
	}
        function update_q2()
	{
		var chatdiv = document.getElementById("q2box");
		chatdiv.innerHTML = '<p style="color:black">' + "Question 2: " + document.q2_input.q2_text.value + '</p>';

		document.q2_input.q2_text.value = "";
		return false;
	}
        function update_m2()
	{
		var chatdiv = document.getElementById("m2box");
		chatdiv.innerHTML = '<p style="color:black">' + document.m2_input.m2_text.value + " Marks" + '</p>';

		document.m2_input.m2_text.value = "";
		return false;
	}
</script>
<div id="namebox" style="width:90%; text-align:center;">
	<p style="color:black;">Please enter the title of this exam in the box below</p>
</div>
<form id="name_input" name="name_input" onsubmit="return update_name();"
    <table width="100%" valign="bottom">
	<tr>
            <td width="80%"><input style="border:2px solid #000; width:90%; height:30px;" type="text" id="name_text" name="name_text" /></td>
	</tr>
    </table>
</form>
<br/><br/>

<div id="q1box" style="width:90%; text-align:center;">
	<p style="color:black;">Question #1: Enter your question in the box below</p>
</div>
<form id="q1_input" name="q1_input" onsubmit="return update_q1();"
    <table width="100%" valign="bottom">
	<tr>
            <td width="80%"><input style="border:2px solid #000; width:90%; height:30px;" type="text" id="q1_text" name="q1_text" /></td>
	</tr>
    </table>
</form><br/>
<div id="m1box" style="width:25%; text-align:center;">
	<p style="color:black;">Enter the amount of marks for this question in the box below</p>
</div>
<form id="m1_input" name="m1_input" onsubmit="return update_m1();"
    <table width="100%" valign="bottom">
	<tr>
            <td width="80%"><input style="border:2px solid #000; width:25%;" type="text" id="m1_text" name="m1_text" /></td>
	</tr>
    </table>
</form>
<br /><br />

<div id="q2box" style="width:90%; text-align:center;">
	<p style="color:black;">Question #2: Enter your question in the box below</p>
</div>
<form id="q2_input" name="q2_input" onsubmit="return update_q2();"
    <table width="100%" valign="bottom">
	<tr>
            <td width="80%"><input style="border:2px solid #000; width:90%; height:30px;" type="text" id="q2_text" name="q2_text" /></td>
	</tr>
    </table>
</form><br/>
<div id="m2box" style="width:25%; text-align:center;">
	<p style="color:black;">Enter the amount of marks for this question in the box below</p>
</div>
<form id="m2_input" name="m2_input" onsubmit="return update_m2();"
    <table width="100%" valign="bottom">
	<tr>
            <td width="80%"><input style="border:2px solid #000; width:25%;" type="text" id="m2_text" name="m2_text" /></td>
	</tr>
    </table>
</form>
<br /><br />

<form action="../instructor_course/index.php">
    <input type="submit" class="fancybutton" value="Save Exam" />
</form>

<?php
include_once "leftcol.php";
include_once "rightcol.php";
include_once "../common/footer.php";
?>